home *** CD-ROM | disk | FTP | other *** search
- -- background: 8347 from stack: in.3
- -- bmap block id: 3497
- -- flags: 0000
- -- background id: 0
- -- name: BlankChaptBkgnd
-
-
- -- part 1 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=20 top=303 right=330 bottom=87
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Quit
- ----- HyperTalk script -----
- on mouseUp
- if short name of this card is "TpcLstTmplt" then exit mouseup
- answer "Perhaps you accidently pressed Quit?" with "Yes I did" or "No I didn't"
- if it is "No I didn't" then domenu "Quit Hypercard"
- end mouseUp
-
-
-
-
- -- part 4 (field)
- -- low flags: 01
- -- high flags: 2007
- -- rect: left=254 top=0 right=342 bottom=512
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: TpcLstFld
- ----- HyperTalk script -----
- on mouseup
- Put the number of words in field "TpcLstFld" into NumWords
- if NumWords is 0 then exit mouseup
- global chapt
- set locktext of field "TpcLstFld" to false
- get the clickloc
- delete item 1 of it
- click at 493,it
- click at 260,it with shiftkey
- set locktext of field "TpcLstFld" to true
- repeat with x = 1 to NumWords
- if the selection is line x of field "TpcLstFld" then exit repeat
- end repeat
- put line x of field "TpcOrdrFld" into TopicNum
- put Chapt & TopicNum into UserChoice
- visual effect zoom open slowly
- go to card UserChoice
- if the number of card fields is 1
- then put IBeam("TxtFld") into dummy
- end mouseup
-
-
-
- -- part 5 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=92 top=303 right=330 bottom=159
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Chapter List
- ----- HyperTalk script -----
- on mouseUp
- if short name of this card is "TpcLstTmplt" then exit mouseup
- go to card "ChptLstCrd"
- end mouseUp
-
-
-
-
- -- part 13 (field)
- -- low flags: 81
- -- high flags: 2004
- -- rect: left=156 top=120 right=205 bottom=356
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 19200
- -- line height: 16
- -- part name: No Match
- ----- HyperTalk script -----
- on mouseup
- hide field "No Match"
- end mouseup
-
-
- -- part 16 (field)
- -- low flags: 81
- -- high flags: 0007
- -- rect: left=86 top=103 right=215 bottom=150
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: TpcOrdrFld
-
-
- -- part 21 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=20 top=265 right=292 bottom=87
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Add Topics
- ----- HyperTalk script -----
- on mouseup
- if short name of this card is "TpcLstTmplt" then exit mouseup
- put short name of this card into Chapt
- put the number of chars in Chapt into NumChars
- put 0 into ChaptNum
- repeat with x = NumChars down to 1
- get 26 ^ (x - 1) * ((CharToNum of char x of Chapt) - 65)
- add It to ChaptNum
- end repeat
- repeat while true
- put the number of lines in field "TpcLstFld" + 1 into TopicNum
- put "Name Topic" && TopicNum && "of Chapt" && ChaptNum into Prompt
- ask prompt
- if it is empty then
- exit mouseup
- end if
- put it into UsrTpcNam
- put UsrTpcNam & return after field "TpcLstFld"
- put TopicNum & return after field "TpcOrdrFld"
- set cursor to 4
- set lockscreen to true
- put PasteAtPrev("NtTmplt") into dummy
- put Chapt & TopicNum into NtCrdNam
- set the name of this card to NtCrdNam
- put UsrTpcNam into field "HeaderFld"
- go to card Chapt
- set lockscreen to false
- flash 2
- end repeat
- end mouseup
-
-
- -- part 22 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=92 top=265 right=292 bottom=159
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Rename
- ----- HyperTalk script -----
- on mouseUp
- if short name of this card is "TpcLstTmplt" then exit mouseup
- Put the number of words in field "TpcLstFld" into NumWords
- if NumWords is 0 then exit mouseup
- ask "Rename what Topic?"
- if it is empty then exit mouseup
- repeat with LnNum = 1 to NumWords
- if It is line LnNum of field "TpcLstFld" then exit repeat
- if LnNum is NumWords then
- show field "No Match"
- exit mouseup
- end if
- end repeat
- put "Enter New Title for Topic" into prompt
- ask prompt
- if it is empty then exit mouseup
- put it into NewName
- put NewName into line LnNum of field "TpcLstFld"
- set cursor to 4
- set lockscreen to true
- put short name of this card into LetterName
- put line LnNum of field "TpcOrdrFld" into TpcOrdrNum
- put LetterName & TpcOrdrNum into RenamedCrd
- go to card RenamedCrd
- put NewName into field "HeaderFld"
- repeat while true
- go to next card
- if short name of this card is "@" then
- put "…" && NewName && "cont." into field "HeaderFld"
- else
- exit repeat
- end if
- end repeat
- go to card LetterName
- set lockscreen to false
- flash 2
- end mouseUp
-
-
- -- part 23 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=164 top=265 right=292 bottom=231
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Delete
- ----- HyperTalk script -----
- on mouseUp
- put number of lines in field "TpcLstFld" into LstTNum
- if LstTNum is 0 then exit mouseup
- ask "Delete which topic?"
- if it is empty then exit mouseup
- put it into DelChoice
- repeat with UDelNum = 1 to LstTNum
- if DelChoice is line UDelNum of field "TpcLstFld" then exit repeat
- if UDelNum is LstTNum then
- show field "No Match"
- exit mouseup
- end if
- end repeat
- put line UDelNum of field "TpcOrdrFld" into ADelNum
- put short name of this card into ChptNam
- if ADelNum is LstTNum then
- delete line UDelNum of field "TpcOrdrFld"
- delete line UDelNum of field "TpcLstFld"
- set cursor to 4
- set lockscreen to true
- go to card ChptNam & ADelNum
- domenu "delete card"
- repeat while short name of this card is "@"
- domenu "delete card"
- end repeat
- else
- repeat with x = 1 to LstTNum
- if line x of field "TpcOrdrFld" is LstTNum then exit repeat
- end repeat
- put ADelNum into line x of field "TpcOrdrFld"
- delete line UDelNum of field "TpcLstFld"
- delete line UDelNum of field "TpcOrdrFld"
- set cursor to 4
- set lockscreen to true
- go to card ChptNam & ADelNum
- domenu "delete card"
- repeat while short name of this card is "@"
- domenu "delete card"
- end repeat
- go to card ChptNam & LstTNum
- set name of this card to ChptNam & ADelNum
- end if
- go to card ChptNam
- set lockscreen to false
- flash 2
- end mouseUp
-
-
-
-
- -- part 24 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=164 top=303 right=330 bottom=231
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Insert
- ----- HyperTalk script -----
- on mouseup
- if short name of this card is "TpcLstTmplt" then exit mouseup
- put number of lines in field "TpcLstFld" into TtlNumTpcs
- if TtlNumTpcs is 0 then exit mouseup
- put short name of this card into Chapt
- put "Name for inserted Topic?" into prompt
- ask prompt
- if it is empty then exit mouseup
- put it into InsertedName
- put "Insert after what topic? [none]" into prompt
- ask prompt
- if it is empty then exit mouseup
- put it into AfterName
- if AfterName is "none" then
- put 1 into UsrTpcNum
- else
- repeat with x = 1 to TtlNumTpcs
- if line x of field "TpcLstFld" is AfterName then exit repeat
- if x is TtlNumTpcs then
- show field "No Match"
- exit mouseup
- end if
- end repeat
- put x + 1 into UsrTpcNum
- end if
- put InsertedName & return before line UsrTpcNum of field "TpcLstFld"
- set cursor to 4
- set lockscreen to true
- put TtlNumTpcs + 1 into LstTpcNum
- put LstTpcNum & return before line UsrTpcNum of field "TpcOrdrFld"
- put PasteAtPrev("NtTmplt") into dummy
- put Chapt & LstTpcNum into NtCrdNam
- set the name of this card to NtCrdNam
- put InsertedName into field "HeaderFld"
- go to card Chapt
- set lockscreen to false
- flash 2
- end mouseup
-